package io.renren.modules.generator.controller;


import com.entites.DeviceSet;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/generator/datadevice")
public class DataDevicelistController {

    @Resource
    private RestTemplate restTemplate;
    @Value("${service-url.nacos-user-service}")
    private String URL;

    /**
     * 列表
     */


    @GetMapping("/sys/listt")
    public List<DeviceSet> getDeviceSet(){

        return restTemplate.getForObject(URL+"/Trans_t_data_device", ArrayList.class);

    }


}
